package com.example.smart.dialog

import android.content.Context
import android.view.Gravity
import android.view.View
import com.example.lib.extend.getDeviceWidth
import com.example.lib.extend.setOnDoubleClickListener
import com.example.smart.R
import com.example.smart.base.dialog.base.BaseDialog
import com.example.smart.databinding.DialogRecodeBinding

class RecodeDialog(context: Context) : BaseDialog<DialogRecodeBinding>(dialogContext = context,
    width = (getDeviceWidth(context) * 0.6).toInt(),
    gravity = Gravity.CENTER) {
    var onStop: (() -> Unit)? = null

    override fun setLayoutRes() = R.layout.dialog_recode

    override fun afterViewCreate(view: View?) {
        banCancel()
        binding.Stop.setOnDoubleClickListener {
            onStop?.invoke()
        }
    }

}